#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int main() {
    int k = 0;
    int minus = 0;
    int hour = 0;
    int nowhour = 0;
    int nowminus = 0;
    scanf("%d:%d %d", &nowhour, &nowminus, &k);
    minus = k % 60;
    hour = (k / 60) % 24;
    nowhour += hour;
    nowminus += minus;
    nowhour = nowhour % 24;
    nowminus = minus % 60;
    printf("%02d:%02d", nowhour, nowminus);
    return 0;
}